#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
void reserve(char* left, char* right)
{
	while (left < right)
	{
		char tmp = *left;
		*left = *right;
		*right = tmp;
		left++;
		right--;
	}
}
void leftMove(char* arr, int k)
{
	size_t len = strlen(arr);
	k %= len;
	reserve(arr, arr + k - 1);
	reserve(arr + k, arr + len - 1);
	reserve(arr, arr + len - 1);
}
int main()
{
	char a[] = "ABCD";
	int sz = sizeof(a) / sizeof(a[0]);
	leftMove(a, 2);
	for (int i = 0; i < sz; i++)
	{
		putchar(a[i]);
	}
	return 0;
}